#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    string longestCommonPrefix(vector<string>& strs) {
    	if(!strs.size())return "";
        string ans = "";
        for(int i = 0; i < strs[0].length(); i++){
        	ans += strs[0][i];
        	for(int j = 1; j < strs.size(); j++){
        		if(strs[j].size() < ans.size() || strs[j][ans.size() - 1] != ans[ans.size() - 1])return ans.substr(0, ans.size() - 1);
			}
		} 
		return ans;
    }
};

int main(){
	return 0;
}

//2020.9.24
